home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11616 < prev    next >
Encoding:
Text File  |  1996-08-05  |  949 b   |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: netcom.com!sergeboj
  3. From: sergeboj@netcom.com (Serge Bojoulitch)
  4. Subject: Re: TYPEDEF help needed
  5. Message-ID: <sergebojDoAGB8.7oG@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. X-Newsreader: TIN [version 1.2 PL1]
  8. References: <Do9J5n.KE7.0.-s@cs.vu.nl>
  9. Date: Fri, 15 Mar 1996 02:59:32 GMT
  10. Sender: sergeboj@netcom14.netcom.com
  11.  
  12. Andre Versteeg (alverste@cs.vu.nl) wrote:
  13. : What is wrong with the following:
  14.  
  15. : I like to have an array of structs with a certain name:
  16.  
  17. : typedef struct Coordinates
  18. : {
  19. :     int x,y;
  20.  
  21. : } Coordinates;
  22.  
  23. : typedef Coordinates[100] CoordinatesList;
  24.           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  25. This is a syntax error, what you need is the following:
  26.  
  27.     typedef Coordinates CoordinatesList[100];
  28.  
  29. Regards,
  30.  
  31. Serge Bojoulitch
  32.  
  33. Disclaimer: any opinions explicitly or implicitly expressed here are
  34.         my own and have nothing to do with those of my employer.
  35.